/**
 * 设备相关工具统一导出
 */
export * from './fingerprint'
export * from './detector'
export * from "./manager"

import { generateDeviceFingerprint } from "./fingerprint"
import { getDeviceInfo } from "./detector"

/**
 * 获取完整的设备指纹信息（用于登录记录）
 * @returns {Promise<Object>} 设备指纹信息
 */
export async function getDeviceFingerprint() {
  const deviceInfo = getDeviceInfo()
  const deviceId = generateDeviceFingerprint()

  return {
    deviceId,
    deviceName: deviceInfo.deviceName,
    deviceType: deviceInfo.deviceType,
    browser: deviceInfo.browser,
    os: deviceInfo.os,
    ipAddress: '', // IP 地址由后端获取
    location: '' // 位置由后端获取
  }
}
